using System.Collections.Specialized;

namespace Wilco.SyntaxHighlighting.Engine.Node.Implementation.Word
{
    /// <summary>
    /// Represents a word node.
    /// </summary>
    public class WordNode : NodeBase
    {
        private readonly StringCollection entities;
        private bool ignoreCase;

        /// <summary>
        /// Gets the collection of entities which represent words.
        /// </summary>
        public StringCollection Entities
        {
            get
            {
                return entities;
            }
        }

        /// <summary>
        /// Gets or sets whether case should be ignored.
        /// </summary>
        public bool IgnoreCase
        {
            get
            {
                return ignoreCase;
            }
            set
            {
                if (value != ignoreCase)
                {
                    ignoreCase = value;
                }
            }
        }

        /// <summary>
        /// Initializes a new instance of a <see cref="WordNode"/> class.
        /// </summary>
        public WordNode()
        {
            entities = new StringCollection();
        }
    }
}